package top.laoshuzi.android.iotcamera.core

import org.koin.android.viewmodel.dsl.viewModel
import org.koin.dsl.module
import top.laoshuzi.android.iotcamera.camera.respository.CameraResposity
import top.laoshuzi.android.iotcamera.camera.viewmodel.CameraViewModel
import top.laoshuzi.android.iotcamera.core.database.AppDatabase
import top.laoshuzi.android.iotcamera.core.network.utils.MqttUtils
import top.laoshuzi.android.iotcamera.core.network.utils.RetrofitUtils

val viewModelModule = module {
    viewModel {
        CameraViewModel(get())
    }
}

val resposityModule = module {
    factory {
        CameraResposity(get())
    }
}

val remoteModule = module {
    single {
        RetrofitUtils.retrofit()
    }
    single {
        MqttUtils.mqttClient()
    }
//    single<PaoService> { get<Retrofit>().create(PaoService::class.java) }
}

val localModule = module {

    single {
        AppDatabase.database()
    }

//    single { get<AppDatabase>().userAccountDao() }
}

